package cn.itcast.zookeeper.annotation;

import com.dangdang.ddframe.job.lite.api.listener.ElasticJobListener;
import com.dangdang.ddframe.job.lite.api.strategy.JobShardingStrategy;
import com.dangdang.ddframe.job.lite.api.strategy.impl.AverageAllocationJobShardingStrategy;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface ElasticSimpleJob {
    String jobName();
    
    String corn();
    
    int shardingTotalCount() default 1;
    
    boolean overwrite() default false;
    
    Class<? extends JobShardingStrategy> jobShardingStrategyClass() default AverageAllocationJobShardingStrategy.class;
    
    Class<? extends ElasticJobListener>[] listeners() default {};
    
    boolean failover() default true;
    
    boolean monitorExecution() default false;
}
